package com.lanou.pianke.search.web.controller;

import com.lanou.pianke.search.entity.Pcomment;
import com.lanou.pianke.search.service.PcommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/es/")
public class PcommentController {

    @Autowired
    private PcommentService pcommentService;

    // 根据文章回复内容查评论
    @GetMapping("findByPcommentContent")
    public List<Pcomment> findByArticleContent(String searchContent){
        return pcommentService.searchByPcommentContent(searchContent);
    }


}
